/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.ytbolg.mcxa.gui;

import java.io.File;
import java.io.IOException;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

/**
 *
 * @author Ytong
 */
public class General {

    public static String AppVersion = "3.0.0.1";
    public static String separator = "";
    public static String AppDir = null;
    public static String GameDir = null;
    public static String ConfigDir = null;
    public static JFrame MainWindow = null;

    public static void Init() {
        separator = System.getProperty("file.separator");
        try {
            AppDir = new File(".").getCanonicalPath();
            ConfigDir = AppDir + separator + "MCXA.config";

        } catch (IOException ex) {
            Logger.getLogger(General.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

    public static void Log(String log, String ThreadName) {
        Calendar c = Calendar.getInstance();
        System.out.println("[" + c.get(Calendar.HOUR_OF_DAY) + ":" + c.get(Calendar.MINUTE) + ":" + c.get(Calendar.SECOND) + "][" + ThreadName + "]" + log);
//  Logger.getLogger("MAIN-THREAD").log(Level.INFO, log);
    }

}
